<div class="form-actions">
  <div class="form-actions-left">
    <%= hidden_field_tag :continue_editing, 1 %>

    <%= submit_tag t('save', :scope => 'shared.admin.form_actions'),
      :id => 'save-button',
      :class => 'wymupdate button no-js-hide' %>

    <%= submit_tag t('save_and_continue_editing', :scope => 'shared.admin.continue_editing'),
      :id => 'save-continue-button',
      :class => "wymupdate button" %>

  </div>
</div>
<% content_for :javascripts do %>
<script type="text/javascript">
  $(document).ready(function () {
    var save_button = $('#save-button'),
        save_continue_button = $('#save-continue-button'),
        continue_input = $('#continue_editing');
    
    save_button.bind('click', function () {
      continue_input.val('0');
    });

    save_continue_button.bind('click', function () {
      continue_input.val('1');
    });
  });
</script>
<% end %>